view release on metacpan or search on metacpan
echo "You may have to fix up the shell scripts to make sure $sh runs them."
fi
rm -f sharp
: Save command line options in file UU/cmdline.opt for later use in
: generating config.sh.
cat > cmdline.opt <<EOSH
: Configure command line arguments.
config_arg0='$0'
config_args='$*'
config_argc=$#
EOSH
argn=1
args_exp=''
args_sep=''
for arg in "$@"; do
cat >>cmdline.opt <<EOSH
config_arg$argn='$arg'
EOSH
cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
$arg
Cross/cflags-cross-arm view on Meta::CPAN
: displays the compiler command line for file
case "X$1" in
Xoptimize=*|X"optimize=*")
eval "$1"
shift
;;
esac
also=': '
case $# in
1) also='echo 1>&2 " CCCMD = "'
esac
case $# in
0) set *.c; echo "The current C flags are:" ;;
esac
set `echo "$* " | sed -e 's/\.[oc] / /g' -e "s/\.${CROSS_NAME}o / /g" -e 's/\.obj / /g' -e "s/\\$obj_ext / /g"`
for file do
case "$#" in
1) extra="-o $file.${CROSS_NAME}o $extra";;
*) echo $n " $file.c $c" ;;
esac
: allow variables like toke_cflags to be evaluated
if echo $file | grep -v / >/dev/null
then
eval 'eval ${'"${file}_cflags"'-""}'
fi
dist/threads-shared/t/utf8.t Test UTF-8 keys in shared hashes
dist/threads-shared/t/wait.t Test cond_wait and cond_timedwait
dist/threads-shared/t/waithires.t Test sub-second cond_timedwait
dist/Tie-File/ChangeLog Tie::File
dist/Tie-File/lib/Tie/File.pm Files as tied arrays
dist/Tie-File/Makefile.PL Build Tie::File
dist/Tie-File/t/01_gen.t Generic read/write tests for Tie::File
dist/Tie-File/t/02_fetchsize.t File length fetch test for Tie::File
dist/Tie-File/t/03_longfetch.t Past-the-end-of-the-array tests for Tie::File
dist/Tie-File/t/04_splice.t SPLICE method tests for Tie::File
dist/Tie-File/t/05_size.t $#a tests for Tie::File
dist/Tie-File/t/06_fixrec.t '_fixrec' method functional tests for Tie::File
dist/Tie-File/t/07_rv_splice.t SPLICE method return value tests for Tie::File
dist/Tie-File/t/08_ro.t read-only mode tests for Tie::File
dist/Tie-File/t/09_gen_rs.t Like 01_gen.t, with unusual record separator
dist/Tie-File/t/10_splice_rs.t Like 04_splice.t, with unusual record separator
dist/Tie-File/t/11_rv_splice_rs.t Like 07_rv_splice.t, with unusual record separator
dist/Tie-File/t/12_longfetch_rs.t Like 03_longfetch.t, with unusual record separator
dist/Tie-File/t/13_size_rs.t Like 05_size.t, with unusual record separator
dist/Tie-File/t/14_lock.t File locking method tests for Tie::File
dist/Tie-File/t/15_pushpop.t PUSH / POP / SHIFT / UNSHIFT for Tie::File
Porting/Glossary view on Meta::CPAN
compress (Loc.U):
This variable is defined but not used by Configure.
The value is the empty string and is not useful.
config_arg0 (Options.U):
This variable contains the string used to invoke the Configure
command, as reported by the shell in the $0 variable.
config_argc (Options.U):
This variable contains the number of command-line arguments
passed to Configure, as reported by the shell in the $# variable.
The individual arguments are stored as variables config_arg1,
config_arg2, etc.
config_args (Options.U):
This variable contains a single string giving the command-line
arguments passed to Configure. Spaces within arguments,
quotes, and escaped characters are not correctly preserved.
To reconstruct the command line, you must assemble the individual
command line pieces, given in config_arg[0-9]*.
Porting/add-package.pl view on Meta::CPAN
### create the dir if it's not there yet
unless( -d $TopDir ) {
system( "mkdir $TopDir" ) and die "Creating dir $TopDir failed: $?";
}
### the module name, like Foo::Bar
### slice syntax not elegant, but we need to remove the
### leading 'lib/' entry
### stupid temp vars! stupid perl! it doesn't do @{..}[0..-1] :(
{ my @list = @{[split '/', $RelTopDir]};
$ModName = join '::', @list[1 .. $#list];
}
### the .pm files in this package
@ModFiles = map { s|^$PkgDirRe||; $_ } @ModFiles
or die "Could not detect modfiles\n";
print "done\n" if $Verbose;
}
my $TopDirRe = quotemeta( $TopDir . '/' );
Porting/add-pod-file view on Meta::CPAN
R => 'Reference Manual',
I => 'Internals and C Language Interface',
H => 'History',
M => 'Miscellaneous',
L => 'Language-Specific',
P => 'Platform-Specific',
);
my @man_section_abbrevs = ();
my $man_sections_str = '';
for (my $i=0; $i<= $#man_sections; $i+=2) {
my $j = $i+1;
push @man_section_abbrevs, $man_sections[$i];
$man_sections_str .= "\t$man_sections[$i] => $man_sections[$j]\n";
}
my %man_sections_seen = map { $_ => 1 } @man_section_abbrevs;
my $man_sections = { @man_sections };
my ($stub, $section, $verbose) = ('') x 3;
GetOptions(
"stub=s" => \$stub,
Porting/bench.pl view on Meta::CPAN
my $n = @$perls;
if ($perl =~ /^-([0-9]+)$/) {
my $p = $1;
die "Error: $who value $perl outside range -1..-$n\n"
if $p < 1 || $p > $n;
return $n - $p;
}
if ($perl =~ /^[0-9]+$/) {
die "Error: $who value $perl outside range 0.." . $#$perls . "\n"
unless $perl < $n;
return $perl;
}
else {
my @perl = grep $perls->[$_][0] eq $perl
|| $perls->[$_][1] eq $perl,
0..$#$perls;
unless (@perl) {
my $valid = '';
for (@$perls) {
$valid .= " $_->[1]";
$valid .= " $_->[0]" if $_->[0] ne $_->[1];
$valid .= "\n";
}
die "Error: $who: unrecognised perl '$perl'\n"
. "Valid perl names are:\n$valid";
}
Porting/bisect-runner.pl view on Meta::CPAN
failing to compile. What was the first commit at which that compilation
failure could be observed?
=item * Solution
Extract code from the test file at the point where C<./miniperl -Ilib -c> was
showing a compilation failure. Use that in bisection with the C<miniperl>
target.
.../Porting/bisect.pl --target=miniperl --start=2ec4590e \
-e 'q|ace| =~ /c(?=.$)/; $#{^CAPTURE} == -1); exit 0;'
=item * Reference
L<GH issue 17293|https://github.com/Perl/perl5/issues/17293>
=back
=head2 Blead breaks CPAN on threaded builds only
=over 4
Porting/check-cpan-pollution view on Meta::CPAN
my $commit;
while (defined(my $line = <$fh>)) {
chomp $line;
if (not $commit) {
next if $line =~ /^\s*$/;
my @cols = split /\0/, $line;
@cols == @ColumnSpec && !grep {!defined($_)} @cols
or die "Malformed commit header line: '$line'";
$commit = {
files => [],
map {$ColumnSpec[$_] => $cols[$_]} (0..$#cols)
};
next;
}
elsif ($line =~ /^\s*$/) { # within commit, blank line
check_commit($commit, \@safe_commits, \@unsafe_commits);
$commit = undef;
}
else { # within commit, non-blank (file) line
push @{$commit->{files}}, $line;
}
Porting/config_h.pl view on Meta::CPAN
my ($cSH, $ch, @ch, %ch) = ("config_h.SH");
open $ch, "<", $cSH or die "Cannot open $cSH: $!\n";
{ local $/ = "\n\n";
@ch = <$ch>;
close $ch;
}
sub ch_index {
%ch = ();
foreach my $ch (0 .. $#ch) {
while ($ch[$ch] =~ m{^/\* ([A-Z]\w+)}gm) {
$ch{$1} = $ch;
}
}
} # ch_index
my %dep = (
# This symbol must be defined BEFORE ...
BYTEORDER => [ qw( UVSIZE ) ],
LONGSIZE => [ qw( BYTEORDER ) ],
Porting/corecpan.pl view on Meta::CPAN
# output %results in the requested format
my @labels = ((map $_->[1], @sources), 'CPAN' );
if ($opt_t) {
my %changed;
my @fields;
for my $dist (sort { lc $a cmp lc $b } keys %results) {
for my $file (sort keys %{$results{$dist}}) {
my @versions = @{$results{$dist}{$file}}{@labels};
for (0..$#versions) {
$fields[$_] = max($fields[$_],
length $versions[$_],
length $labels[$_],
length '!EXIST'
);
}
if (our $opt_v or grep $_ ne $versions[0], @versions) {
$changed{$dist} = 1;
}
}
}
printf "%*s ", $fields[$_], $labels[$_] for 0..$#labels;
print "\n";
printf "%*s ", $fields[$_], '-' x length $labels[$_] for 0..$#labels;
print "\n";
my $field_total;
$field_total += $_ + 1 for @fields;
for my $dist (sort { lc $a cmp lc $b } keys %results) {
next unless $changed{$dist};
print " " x $field_total, " $dist\n";
for my $file (sort keys %{$results{$dist}}) {
my @versions = @{$results{$dist}{$file}}{@labels};
for (0..$#versions) {
printf "%*s ", $fields[$_], $versions[$_]//'!EXIST'
}
print " $file\n";
}
}
}
else {
for my $dist (sort { lc $a cmp lc $b } keys %results) {
my $distname_printed = 0;
for my $file (sort keys %{$results{$dist}}) {
Porting/leakfinder.pl view on Meta::CPAN
1 while 1;
1 while some_condition_with_side_effects; */
$a{buttons}[2*$a{default_button}] = [$a{buttons}[2*$a{default_button}]];
$aliases{$code_point} = [ $aliases{$code_point} ];
$aliases_maps->[$i] = [ $aliases_maps->[$i] ]
$allow ? $hash{$acc} = $allow : push @list, $acc;
/(a*(*MARK:a)b?)(*MARK:x)(*SKIP:a)(?{$count++; push @res,$1})(*FAIL)/g;
$^A .= new version ~$_ for "\xce", v205, "\xcc";
A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more
$args{include_dirs} = [ $args{include_dirs} ]
$ARRAY[++$#ARRAY] = $value;
@a = sort ($b, @a)
$a = {x => $a};
$base =~ /^[cwnv]/i or push @tmpl, "$base>", "$base<";
$base =~ /^[nv]/i or push @formats, "$base>", "$base<";
BEGIN { unshift(@INC, "./blib") }
BEGIN { unshift @INC, "lib" }
BEGIN { unshift(@INC, LIST) }
binmode *STDERR, ":encoding(utf8)";
binmode *STDOUT, ":encoding(utf8)";
char const *file = __FILE__;
Porting/manisort view on Meta::CPAN
close($IN) or die($!);
chomp(@manifest);
my %seen= ( '' => 1 ); # filter out blank lines
my @sorted = grep { !$seen{$_}++ }
sort_manifest(@manifest)
;
# Check if the file is sorted or not
my $exit_code = 0;
for (my $ii = 0; $ii < $#manifest; $ii++) {
next if ($manifest[$ii] eq $sorted[$ii]);
$exit_code = 1; # Not sorted
last;
}
# Output sorted file
if (defined($outfile)) {
open(my $OUT, '>', $outfile)
or die("Can't open output file '$outfile': $!");
binmode($OUT);
Porting/test-dist-modules.pl view on Meta::CPAN
for (1..$n) {
_print "not ok $test # TODO & SKIP $why\n";
$test = $test + 1;
}
local $^W = 0;
last TODO;
}
sub eq_array {
my ($ra, $rb) = @_;
return 0 unless $#$ra == $#$rb;
for my $i (0..$#$ra) {
next if !defined $ra->[$i] && !defined $rb->[$i];
return 0 if !defined $ra->[$i];
return 0 if !defined $rb->[$i];
return 0 unless $ra->[$i] eq $rb->[$i];
}
return 1;
}
sub eq_hash {
my ($orig, $suspect) = @_;
Porting/updateAUTHORS.pm view on Meta::CPAN
"binary_changed" => "Bin+-",
);
sub report_stats {
my ($self, $stats_key, @types)= @_;
my @extra= "name";
my @rows;
my @total;
foreach my $name (__sorted_hash_keys($self->{$stats_key})) {
my @data= map { $self->{$stats_key}{$name}{$_} // 0 } @types;
$total[$_] += $data[$_] for 0 .. $#data;
push @data, $name;
push @rows, \@data if $data[0];
}
@rows= sort {
my $cmp= 0;
for (0 .. $#$a - 1) {
$cmp= $b->[$_] <=> $a->[$_];
last if $cmp;
}
$cmp ||= $Collate->cmp($a->[-1], $b->[-1]);
$cmp
} @rows;
@rows= reverse @rows if $self->{in_reverse};
if ($self->{as_cumulative}) {
my $sum= [];
for my $row (@rows) {
do {
$sum->[$_] += $row->[$_];
$row->[$_]= $sum->[$_];
}
for 0 .. $#types;
}
}
if ($self->{as_percentage}) {
for my $row (@rows) {
$row->[$_]= sprintf "%.2f", ($row->[$_] / $total[$_]) * 100
for 0 .. $#types;
}
}
foreach my $row (@rows) {
my $name= $row->[-1];
$name =~ s/\s+<.*\z//;
$name =~ s/\s+\@.*\z//;
$row->[-1]= $name;
}
my @col_names= map { $pretty_name{$_} // $_ } @types;
=for apidoc av_tindex
=for apidoc_item av_top_index
These behave identically.
If the array C<av> is empty, these return -1; otherwise they return the maximum
value of the indices of all the array elements which are currently defined in
C<av>.
They process 'get' magic.
The Perl equivalent for these is C<$#av>.
Use C<L</av_count>> to get the number of elements in an array.
=for apidoc av_len
Same as L</av_top_index>. Note that, unlike what the name implies, it returns
the maximum index in the array. This is unlike L</sv_len>, which returns what
you would expect.
B<To get the true number of elements in the array, instead use C<L</av_count>>>.
configure.com view on Meta::CPAN
$ signal_t="void"
$ stdchar="char"
$!
$ IF mymalloc
$ THEN d_mymalloc="define"
$ ELSE d_mymalloc="undef"
$ ENDIF
$!
$ usedl="define"
$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
$!
$ libs=" "
$ libc="(DECCRTL)"
$!
$! perllibs should be libs with all non-core libs (such as gdbm) removed.
$!
$ perllibs=libs
$!
$!
$ d_PRId64 = "define"
configure.gnu view on Meta::CPAN
echo "This can happen on filesystems that aren't fully case sensitive."
echo "You'll have to explicitly extract Configure and run that."
exit 1
fi
;;
esac
opts=''
verbose=''
create='-e'
while test $# -gt 0; do
case $1 in
--help)
cat <<EOM
Usage: configure.gnu [options]
This is GNU configure-like front end for a metaconfig-generated Configure.
It emulates the following GNU configure options (must be fully spelled out):
--help
--no-create
--prefix=PREFIX
--cache-file (ignored)
cpan/Archive-Tar/t/05_iter.t view on Meta::CPAN
qr|^c$|,
qr|^d$|,
qr|^directory/$|,
qr|^directory/really.*name/$|,
qr|^directory/.*/myfile$|,
);
use_ok( $Class );
### crazy ref to special case 'all'
for my $index ( \0, 0 .. $#Expect ) {
my %opts = ();
my @expect = ();
my $dotest = sub {
my $desc = shift;
my $next = $Class->iter( $File, 0, \%opts );
my $pp_opts = join " => ", %opts;
ok( $next, "Iterator created from $File ($pp_opts $desc)" );
cpan/Archive-Tar/t/09_roundtrip.t view on Meta::CPAN
: ();
my ( $fh, $filename ) = tempfile( UNLINK => 1 );
$new->write( $filename, @compress );
# read the archive again from disk
$new = Archive::Tar->new($filename);
# Adjust our expectations of
my @oldfiles = $old->list_files;
for (my $i = 0; $i <= $#oldfiles; $i++) {
chop $oldfiles[$i] if $directory_or_not[$i];
}
# compare list of files
is_deeply(
[ $new->list_files ],
[ @oldfiles ],
"$archive_name roundtrip on file names"
);
}
cpan/CPAN-Meta-YAML/t/lib/TestML/Tiny.pm view on Meta::CPAN
use Test::More 0.88 ();
# use XXX;
sub import {
strict->import;
warnings->import;
}
sub new {
my $self = bless { @_[1..$#_] }, $_[0];
my $testml = $self->_get_testml;
my $bridge = $self->_get_bridge;
$self->{runtime} ||= TestML::Tiny::Runtime->new(
bridge => $bridge,
);
my $compiler = TestML::Tiny::Compiler->new(
$self->{version} ? (version => $self->{version}) : (),
);
$self->{function} = $compiler->compile($testml);
return $self;
cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm view on Meta::CPAN
my $cmv = CPAN::Meta::Validator->new( $converted );
unless ( $cmv->is_valid ) {
my $errs = join("\n", $cmv->errors);
die "Failed to clean-up $old_version metadata. Errors:\n$errs\n";
}
}
return $converted;
}
elsif ( $old_version > $new_version ) {
my @vers = sort { $b <=> $a } keys %known_specs;
for my $i ( 0 .. $#vers-1 ) {
next if $vers[$i] > $old_version;
last if $vers[$i+1] < $new_version;
my $spec_string = "$vers[$i+1]-from-$vers[$i]";
$converted = _convert( $converted, $down_convert{$spec_string}, $vers[$i+1], $is_fragment );
unless ( $args->{is_fragment} ) {
my $cmv = CPAN::Meta::Validator->new( $converted );
unless ( $cmv->is_valid ) {
my $errs = join("\n", $cmv->errors);
die "Failed to downconvert metadata to $vers[$i+1]. Errors:\n$errs\n";
}
}
}
return $converted;
}
else {
my @vers = sort { $a <=> $b } keys %known_specs;
for my $i ( 0 .. $#vers-1 ) {
next if $vers[$i] < $old_version;
last if $vers[$i+1] > $new_version;
my $spec_string = "$vers[$i+1]-from-$vers[$i]";
$converted = _convert( $converted, $up_convert{$spec_string}, $vers[$i+1], $is_fragment );
unless ( $args->{is_fragment} ) {
my $cmv = CPAN::Meta::Validator->new( $converted );
unless ( $cmv->is_valid ) {
my $errs = join("\n", $cmv->errors);
die "Failed to upconvert metadata to $vers[$i+1]. Errors:\n$errs\n";
}
cpan/CPAN/lib/App/Cpan.pm view on Meta::CPAN
return $return_value;
}
my $LEVEL;
{
package
Local::Null::Logger; # hide from PAUSE
my @LOGLEVELS = qw(TRACE DEBUG INFO WARN ERROR FATAL);
$LEVEL = uc($ENV{CPANSCRIPT_LOGLEVEL} || 'INFO');
my %LL = map { $LOGLEVELS[$_] => $_ } 0..$#LOGLEVELS;
unless (defined $LL{$LEVEL}){
warn "Unsupported loglevel '$LEVEL', setting to INFO";
$LEVEL = 'INFO';
}
sub new { bless \ my $x, $_[0] }
sub AUTOLOAD {
my $autoload = our $AUTOLOAD;
$autoload =~ s/.*://;
return if $LL{uc $autoload} < $LL{$LEVEL};
$CPAN::Frontend->mywarn(">($autoload): $_\n")
cpan/CPAN/lib/CPAN.pm view on Meta::CPAN
$CPAN::Frontend->mywarn($_);
die $_;
}
}
},
]
};
if ($usable->{$mod}) {
local @INC = @INC;
pop @INC if $INC[-1] eq '.';
for my $c (0..$#{$usable->{$mod}}) {
my $code = $usable->{$mod}[$c];
my $ret = eval { &$code() };
$ret = "" unless defined $ret;
if ($@) {
# warn "DEBUG: c[$c]\$\@[$@]ret[$ret]";
return;
}
}
}
return $HAS_USABLE->{$mod} = 1;
cpan/CPAN/lib/CPAN/CacheMgr.pm view on Meta::CPAN
sub cachesize {
shift->{DU};
}
#-> sub CPAN::CacheMgr::tidyup ;
sub tidyup {
my($self) = @_;
return unless $CPAN::META->{LOCK};
return unless -d $self->{ID};
my @toremove = grep { $self->{SIZE}{$_}==0 } @{$self->{FIFO}};
for my $current (0..$#toremove) {
my $toremove = $toremove[$current];
$CPAN::Frontend->myprint(sprintf(
"DEL(%d/%d): %s \n",
$current+1,
scalar @toremove,
$toremove,
)
);
return if $CPAN::Signal;
$self->_clean_cache($toremove);
cpan/CPAN/lib/CPAN/Debug.pm view on Meta::CPAN
sub debug {
my($self,$arg) = @_;
my @caller;
my $i = 0;
while () {
my(@c) = (caller($i))[0 .. ($i ? 3 : 2)];
last unless defined $c[0];
push @caller, \@c;
for (0,3) {
last if $_ > $#c;
$c[$_] =~ s/.*:://;
}
for (1) {
$c[$_] =~ s|.*/||;
}
last if ++$i>=3;
}
pop @caller;
if ($CPAN::DEBUG{$caller[0][0]} & $CPAN::DEBUG) {
if ($arg and ref $arg) {
view all matches for this distributionview release on metacpan - search on metacpan